﻿<%@ Page Language="C#" MasterPageFile="~/Enterprise/Master/AdminMaster.Master" AutoEventWireup="true"
    CodeBehind="InvoiceAdd.aspx.cs" Inherits="HZ.DrugTrade.Web.Enterprise.InvoiceManage.InvoiceAdd"
    Title="发票明细" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <%--    <div id="tabnav">
        <ul>
            <li class="active"><a href="javascript:void(0);">发票明细</a></li>
        </ul>
    </div>--%>
    <div class="maincon">
        <div class="note">
            发票明细
        </div>
        <div class="note2">
        </div>
        <table>
            <tr>
                <th style="width: 100px;">
                    <asp:Label ID="lblInvoiceId" runat="server" Text="发票号："></asp:Label>
                </th>
                <td align="center">
                    <asp:Label runat="server" ID="txtInvoiceId"></asp:Label>
                </td>
                <th style="width: 100px;">
                    <asp:Label ID="lblAmount" runat="server" Text="发票总金额："></asp:Label>
                </th>
                <td>
                    <asp:Label ID="txtAmount" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <th style="width: 100px;">
                    <asp:Label ID="lblHospital" runat="server" Text="采购医疗机构："></asp:Label>
                </th>
                <td>
                    <asp:Label ID="txtHospital" runat="server"></asp:Label>
                </td>
                <th style="width: 100px;">
                    <asp:Label ID="lblStatus" runat="server" Text="发票状态："></asp:Label>
                </th>
                <td>
                    <asp:Label ID="txtStatus" runat="server"></asp:Label>
                </td>
            </tr>
        </table>
    </div>
    <br />
    <div id="tabcontent2">
        <table class="querylist">
            <tr>
                <td align="right">产品名称：
                </td>
                <td align="left">
                    <asp:TextBox ID="txtGoodsName" runat="server"></asp:TextBox>
                </td>
                <td align="right">规格型号：
                </td>
                <td align="left">
                    <asp:TextBox ID="txtOutLookc" runat="server"></asp:TextBox>
                </td>
                <td align="right">
                    <%--采购医疗机构：--%>材质：
                </td>
                <td align="left">
                    <%--<asp:TextBox ID="txtHospitalName" runat="server"></asp:TextBox>--%>
                    <asp:TextBox ID="txtMaterial" runat="server"></asp:TextBox>
                </td>

                <td rowspan="2">
                    <hz:HzButton runat="server" ID="btnQuery" CssClass="btn" Text="单内查询" OnClick="btnQuery_Click" />
                </td>
            </tr>
            <tr>
                <td align="right">采购单：
                </td>
                <td align="left">
                    <asp:TextBox ID="txtOrderName" runat="server"></asp:TextBox>
                </td>
                <td align="right">
                    <%--产品名称：--%>
                    配送时间：
                </td>
                <td align="left">
                    <%--<asp:TextBox ID="txtGoods" runat="server"></asp:TextBox>--%>
                    <asp:TextBox ID="txtTimeFrom" runat="server" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
                        Width="62px" MaxLength="10"></asp:TextBox>-<asp:TextBox ID="txtTimeTo" runat="server"
                            onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" MaxLength="10" Width="62px"></asp:TextBox>
                </td>
                <td align="right">生产企业：
                </td>
                <td align="left">
                    <asp:TextBox ID="txtCompanyName" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right">拼音码：
                </td>
                <td align="left">
                    <asp:TextBox ID="txtpinyincode" runat="server"></asp:TextBox>
                </td>
                <td align="right">
                    <asp:Label Text="项目：" ID="lblProjectid" runat="server" />
                </td>
                <td align="left">
                    <asp:DropDownList ID="ddlProjectid" runat="server">
                        <asp:ListItem Value="0002">2014年内蒙古自治区网上高值医用耗材阳光采购项目</asp:ListItem>
                        <asp:ListItem Value="0001">2012年内蒙古自治区网上医用耗材采购项目</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
        </table>
    </div>
    <asp:GridView ID="gvwInvoiceAdd" class="mainlist" runat="server" AutoGenerateColumns="False"
        EmptyDataText="没有符合条件的数据！">
        <Columns>
            <asp:TemplateField HeaderText=" ">
                <HeaderTemplate>
                    <input id="addTable_chkAll" name="chkAll" type="checkbox" onclick="SelectAllCheckboxes(this, 'ctl00_ContentPlaceHolder1_gvwInvoiceAdd', 'addTable_chkAll'); " />
                </HeaderTemplate>
                <ItemTemplate>
                    <input type="checkbox" name="ChkOrderID" id="ChkOrderID" value='<%#Eval("DistributionSerialID")%>'
                        <%#Eval("AuditStatus").ToString() == "1" ? "disabled='disabled'" : ""%> onclick="chkChecked(this, 'ctl00_ContentPlaceHolder1_gvwInvoiceAdd', 'addTable_chkAll');" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="OrderName" HeaderText="采购单名称" ReadOnly="true" />
            <%--            <asp:BoundField DataField="TotalAmount" HeaderText="采购总额" ReadOnly="true" DataFormatString="{0:F2}" />--%>
            <%--<asp:BoundField DataField="Amount" HeaderText="采购金额" ReadOnly="true" DataFormatString="{0:F2}" />      --%>        <%--update by lhl 应该显示每条明细的采购金额--%>
            <asp:BoundField DataField="HospitalName" HeaderText="采购医疗机构" ReadOnly="true" />
            <asp:BoundField DataField="CompanyName_SC" HeaderText="生产企业" ReadOnly="true" />
            <asp:BoundField DataField="GoodsName" HeaderText="产品名称" ReadOnly="true" />
            <asp:BoundField DataField="Outlookc" HeaderText="规格型号" ReadOnly="true" />
            <asp:BoundField DataField="Material" HeaderText="材质" NullDisplayText="无" />
            <%--<asp:BoundField DataField="Price" HeaderText="采购价格" ReadOnly="true" DataFormatString="{0:F2}"/>--%>
            <asp:TemplateField HeaderText="采购价">
                <ItemTemplate>
                    <asp:Label ID="lblPrice" runat="server" Text='<%#HZ.DrugTrade.Web.Function.FormPrice(Eval("ProjectID"), Eval("Price")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="PurchaseCount" HeaderText="采购数量" ReadOnly="true" />
            <asp:BoundField DataField="Dis_DistributeCount" HeaderText="批配送量" ReadOnly="true" />
            <asp:BoundField DataField="Dis_WarehouseCount" HeaderText="批入库量" ReadOnly="true" />
            <%--<asp:BoundField DataField="returncount" HeaderText="退货数量" />--%>
            <asp:BoundField DataField="Settlecount" HeaderText="可结算量" ReadOnly="true" />
            <%--<asp:BoundField DataField="SettleAmount" HeaderText="可结算金额" ReadOnly="true" />--%>
            <asp:TemplateField HeaderText="可结算金额">
                <ItemTemplate>
                    <asp:Label ID="lblSettleAmount" runat="server" Text='<%#HZ.DrugTrade.Web.Function.FormPrice(Eval("ProjectID"), Eval("SettleAmount")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="BatchRecordID" HeaderText="批号" ReadOnly="true" />
            <asp:BoundField DataField="DistributeTime" HeaderText="配送时间" ReadOnly="true" DataFormatString="{0:yyyy-MM-dd}" />
        </Columns>
    </asp:GridView>
    <div class="page">
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_OnPageChanged">
        </webdiyer:AspNetPager>
    </div>
    <div class="listip">
        <ul>
            <li>提示:</li>
        </ul>
    </div>
    <div class="listctrl">
        <hz:HzButton ID="btnAdd" runat="server" Text="添加明细" OnClick="btnAdd_Click" CssClass="btn"
            ToolTip="添加已勾选的配送单" OperateType="编辑" />
        <hz:HzButton ID="btnDel" runat="server" Text="删除明细" OnClientClick="return checkSelectedItems('ctl00_ContentPlaceHolder1_gvwInvoiceAdd','请至少选择一条配送单！') && confirm('确定删除吗？');"
            OnClick="btnDel_Click" CssClass="btn" ToolTip="删除已勾选的配送单" OperateType="删除" />
        <%--<input type="button" value="返回发票列表" onclick="document.location='InvocieList.aspx'"
            class="btn" />--%>
        <%--<hz:HzLinkButton   ID="back" CssClass="btn" PostBackUrl="InvocieList.aspx" runat="server" Text="返回发票列表"></hz:HzLinkButton> --%>
        <hz:HzButton runat="server" ID="btnSumbit" CssClass="btn" Text="提交给医疗机构" ToolTip="将此发票提交给医疗机构"
            OnClick="btnSumbit_Click" />
        <hz:HzButton ID="btnDrop" Text="撤回发票" runat="server"
            CssClass="btn" Width="90px" OnClick="btnDrop_Click" />
        <hz:HzButton ID="btn_back" Text="返回发票列表" runat="server" OnClick="btn_back_Click"
            CssClass="btn" Width="90px" />
    </div>
</asp:Content>
